/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.awt.Component;
import javax.swing.JFrame;

/**
 *
 * @author Raul
 */
public class GestorTest {
    
    //Codigo frecuente cuando pruebo pantallitasa
    public void createAndShowGUI(final Component componente) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                //Create and set up the window.
                JFrame frame = new JFrame("Test Componente");
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

                //Add contents to the window.
                frame.add(componente);

                //Display the window.
                frame.pack();
                frame.setLocationRelativeTo(null);
                frame.setVisible(true);
            }
        });
    }
    
    public void pausarTest(int millis){
        try {
            Thread.sleep(millis);
        } catch(InterruptedException e) {
            System.out.println("could not create pause");
        }
    }
}
